<div class="dux-page-header am-cf">
    <div class="page-title">
        <a class="am-btn am-btn-primary" href="{url('index')}"> 用户列表</a>
    </div>
    <div class="page-action">
        <a class="am-btn am-btn-danger" href="javascript:location.reload();"><i class="am-icon-refresh"></i></a>
    </div>
</div>
<div class="dux-body">
    <div class="am-panel am-panel-default dux-panel">
        <div class="am-panel-hd">{$assignName}用户</div>
        <div class="am-panel-bd">
            <form class="am-form  am-form-horizontal dux-form" data-dux="form-bind" method="post">
                <fieldset>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">角色</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <select name="role_id" class="am-form-field" data-am-selected="{btnWidth: '100%'}" required>
                                <!--loop{$roleList as $vo}-->
                                <option value="{$vo.role_id}"
                                <!--if{ $vo['role_id'] == $info['role_id'] }--> selected <!--{/if}-->
                                >{$vo.name}</option>
                                <!--{/loop}-->
                            </select>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">副角色</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <select name="role_ext[]" class="am-form-field" data-am-selected="{btnWidth: '100%'}" multiple>
                                <!--loop{$roleList as $vo}-->
                                <option value="{$vo.role_id}"
                                <!--if{in_array($vo.role_id, (array)$roleArray)}--> selected <!--{/if}-->
                                >{$vo.name}</option>
                                <!--{/loop}-->
                            </select>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">用户名</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input type="text" name="username" value="{$info.username}" placeholder="请输入用户名" minlength="3" maxlength="20" required>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">昵称</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input type="text" name="nickname" value="{$info.nickname}" placeholder="请输入昵称" minlength="2" maxlength="20" required>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">密码</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <input class="am-form-field" type="password" name="password" placeholder="不修改密码请留空" >
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-u-md-2 am-u-sm-12 am-form-label">状态</label>
                        <div class="am-u-md-10 am-u-sm-12">
                            <?php if(!isset($info['status'])) $info[ 'status']=1 ; ?>
                            <div>
                                <select name="status" data-am-selected="{btnWidth: '100%'}" required>
                                    <option value="1" <!--if{$info['status']}--> selected <!--{/id}--> >正常</option>
                                    <option value="0" <!--if{!$info['status']}--> selected <!--{/id}--> >禁用</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <div class="am-u-sm-offset-12 am-u-md-offset-2">
                            <input type="hidden" name="user_id" value="{$info.user_id}">
                            <button class="am-btn am-btn-primary" type="submit" disabled>保存</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>